<template>
<div>
  <p @click = "sub">Hello World， Global-Component</p>
  <p>{{a}}</p>
  <p>{{b}}</p>
</div>
</template>

<script>
export default {
  name: 'HelloGlobal',
  props: ['a', 'b'],
  methods: {
    sub () {
      this.$emit('subEvent', '子组件事件绑定触发')
    }
  }
}
</script>

<style lang="less" scoped>
div{
  p{
    color: gold;
  }
}
</style>
